package org.cscarioni

class CardService {
	def estimatesService
    boolean transactional = true

    def save(card) {
    	card.save()
    }
	
	def changeColumn(cardID,columnID){
		def card = Card.get(cardID)
		def column = Column.get(columnID)
		card.column=column
		card.save()
	}
	def saveEstimatedTimeForAllEntities(card){
		def date=new Date()
		estimatesService.saveEstimatesForDayAndEntity(date,card.sprint,card.sprint.project)
		estimatesService.saveEstimatesForDayAndEntity(date,card.user,card.sprint.project)
		estimatesService.saveEstimatesForDayAndEntity(date,card.user.team,card.sprint.project)
	}
}
